// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
//
// ███╗   ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗  ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║   ██║   ██║   ██║██║     █████╗
// ██║╚██╗██║██║   ██║   ██║   ██║██║     ██╔══╝
// ██║ ╚████║╚██████╔╝   ██║   ██║╚██████╗███████╗
// ╚═╝  ╚═══╝ ╚═════╝    ╚═╝   ╚═╝ ╚═════╝╚══════╝
// ------------------------------------------------
//
// This file is automatically generated.
// Please do not edit these files manually.
//
// ------------------------------------------------

#nullable restore

using Elastic.Clients.Elasticsearch.Serverless.Fluent;
using Elastic.Clients.Elasticsearch.Serverless.Serialization;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Text.Json;
using System.Text.Json.Serialization;

namespace Elastic.Clients.Elasticsearch.Serverless.Nodes;

public sealed partial class IngestStats
{
	/// <summary>
	/// <para>
	/// Total number of documents ingested during the lifetime of this node.
	/// </para>
	/// </summary>
	[JsonInclude, JsonPropertyName("count")]
	public long Count { get; init; }

	/// <summary>
	/// <para>
	/// Total number of documents currently being ingested.
	/// </para>
	/// </summary>
	[JsonInclude, JsonPropertyName("current")]
	public long Current { get; init; }

	/// <summary>
	/// <para>
	/// Total number of failed ingest operations during the lifetime of this node.
	/// </para>
	/// </summary>
	[JsonInclude, JsonPropertyName("failed")]
	public long Failed { get; init; }

	/// <summary>
	/// <para>
	/// Total number of bytes of all documents ingested by the pipeline.
	/// This field is only present on pipelines which are the first to process a document.
	/// Thus, it is not present on pipelines which only serve as a final pipeline after a default pipeline, a pipeline run after a reroute processor, or pipelines in pipeline processors.
	/// </para>
	/// </summary>
	[JsonInclude, JsonPropertyName("ingested_as_first_pipeline_in_bytes")]
	public long IngestedAsFirstPipelineInBytes { get; init; }

	/// <summary>
	/// <para>
	/// Total number of ingest processors.
	/// </para>
	/// </summary>
	[JsonInclude, JsonPropertyName("processors")]
	public IReadOnlyCollection<IReadOnlyDictionary<string, Elastic.Clients.Elasticsearch.Serverless.Nodes.KeyedProcessor>> Processors { get; init; }

	/// <summary>
	/// <para>
	/// Total number of bytes of all documents produced by the pipeline.
	/// This field is only present on pipelines which are the first to process a document.
	/// Thus, it is not present on pipelines which only serve as a final pipeline after a default pipeline, a pipeline run after a reroute processor, or pipelines in pipeline processors.
	/// In situations where there are subsequent pipelines, the value represents the size of the document after all pipelines have run.
	/// </para>
	/// </summary>
	[JsonInclude, JsonPropertyName("produced_as_first_pipeline_in_bytes")]
	public long ProducedAsFirstPipelineInBytes { get; init; }

	/// <summary>
	/// <para>
	/// Total time, in milliseconds, spent preprocessing ingest documents during the lifetime of this node.
	/// </para>
	/// </summary>
	[JsonInclude, JsonPropertyName("time_in_millis")]
	public long TimeInMillis { get; init; }
}